package com.code.modules.base.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.code.modules.base.model.Resource;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 资源信息表(菜单,资源) Mapper 接口
 * </p>
 *
 * @author MyBatisPlus
 * @since 2021-10-19
 */
public interface ResourceMapper extends BaseMapper<Resource> {

    List<Resource> getResourceByRoleid(@Param("roleid")Integer roleid);

    List<Map<String, Object>> resTreeMap(@Param("condition") String condition);

    String getResNameByCode(@Param("code") String code);

    int  getResIdByCode(@Param("pcode") String pcode);

}
